﻿@model Alabama.JobRegister
<script type="text/javascript">
    $(document).ready(function () {
        $('.timepicker1').timepicker({
            showMeridian: false,
            defaultTime: 'value',
            minuteStep: 1,
            showSeconds: false
        });
    });
    function beforSubmit() {
        var DateFrom = convertDateTimeVItoEN($("#DateFrom").val()) + $(".timeFrom").val();
        $("#DateFrom").val(DateFrom);
        return true;
    }
</script>
<div class="row-fluid">
    <div class="span12">
        <div class="box">
            <div class="box-title">
                <h3>
                    <i class="icon-table"></i>@ViewBag.Title</h3>
            </div>
            <div class="box-content">
                <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
                <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
                @using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal" }))
                {
                    @Html.ValidationSummary(true)                    

                    @Html.HiddenFor(model => model.ID)
                    @Html.HiddenFor(model => model.UserID)
                    @Html.HiddenFor(model => model.Created)
                    <div class="control-group">
                        <label class="control-label" for="UserName">
                            Người đăng ký</label>
                        <div class="controls">
                            <input type="text" name="UserName" value="@ViewBag.UserName" Readonly ="Readonly" />
                            @Html.ValidationMessageFor(model => model.UserID)
                        </div>
                    </div> 
                    <div class="control-group">
                        <label class="control-label" for="NguoiThucHien">
                            Người thực hiện</label>
                        <div class="controls">
                            @Html.TextAreaFor(model => model.NguoiThucHien, new { rows = "3", Class = "input-xxlarge" })
                            @Html.ValidationMessageFor(model => model.NguoiThucHien)
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="LocationName">
                            Địa điểm</label>
                        <div class="controls">
                            @*<select data-placeholder="Chọn địa điểm" name="LocationID" class="chosen-with-diselect">
                                @Html.Raw(ViewBag.dataLocation)
                            </select>*@
                            @Html.TextBoxFor(model => model.Location)
                            @Html.ValidationMessageFor(model => model.Location)
                        </div>
                    </div>  
                    <div class="control-group">
                        <label class="control-label" for="DateFrom">
                            Thời gian bắt đầu</label>
                        <div class="controls">
                            @Html.TextBoxFor(model => model.DateFrom, new { Class = "date-picker", @Value = Model.DateFrom.ToString("dd/MM/yyyy") })
                            <div class="input-append bootstrap-timepicker-component">
                                <input class="timepicker1 input-small timeFrom" type="text" value="@ViewBag.DateFrom" name="timeFrom"/>
                                <span class="add-on"><i class="icon-time"></i></span>
                            </div>
                            @Html.ValidationMessageFor(model => model.DateFrom)
                        </div>
                    </div>
@*<div class="control-group">
                        <label class="control-label" for="DateTo">
                            đến</label>
                        <div class="controls">
                            @Html.TextBoxFor(model => model.DateTo, new { Class = "date-picker" })
                            @Html.ValidationMessageFor(model => model.DateTo)
                        </div>
                    </div>*@         
                    <div class="control-group">
                        <label class="control-label" for="Content">
                            Nội dung</label>
                        <div class="controls">
                            @Html.TextAreaFor(model => model.Content, new { rows = "4" , Class="input-xxlarge"})
                            @Html.ValidationMessageFor(model => model.Content)
                        </div>
                    </div>
                               
                    <div class="form-actions">
                        <input type="submit" value="Lưu lại" class="btn btn-info" onclick="beforSubmit();" />
                        @Html.ActionLink("Hủy", "Index", null, new { @class = "btn" })
                    </div>
                }
            </div>
        </div>
    </div>
</div>
